#!/bin/bash

dr=`pwd`
pushd `pwd`
cd /
#find /home/avadh/workspace/qemu-0.9.1/ -name '*.c' -o -name '*.cpp' -o -name '*.h' -o -name '*.l' -o -name '*.y' > /home/avadh/bin/cscope.files
echo "dr is $dr"
find $dr -path '*build*' -prune -name '*.c' -o -name '*.cpp' -o -name '*.h' -o -name '*.l' -o -name '*.y' -o -name '*.S' > $dr/cscope.files

popd
#cscope -i /home/avadh/bin/cscope.files -b
cscope -i $dr/cscope.files -b
echo $CSCOPE_DB

